﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class CreateEnum : BasePage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        UserPower.CheckAction((int)FreeHouse.Power.Actions.TEnum.Create);
    }
    protected void Field_Click(object sender, EventArgs e)
    {
        string fileName = "FreeHouse.Power.Field.cs";
        Response.ContentType = "text/plain";
        Response.ContentEncoding = System.Text.Encoding.UTF8;
        HttpContext.Current.Response.AppendHeader("Content-Disposition", "attachment;filename=" + "" + fileName);
        Response.Write(FreeHouse.BLL.ToEnum.CreateField());
        Response.End();
    }
    protected void ActionClass_Click(object sender, EventArgs e)
    {
        string fileName = "FreeHouse.Power.ActionClass.cs";
        Response.ContentType = "text/plain";
        Response.ContentEncoding = System.Text.Encoding.UTF8;
        HttpContext.Current.Response.AppendHeader("Content-Disposition", "attachment;filename=" + "" + fileName);
        Response.Write(FreeHouse.BLL.ToEnum.CreateActionClass());
        Response.End();
    }
    protected void Action_Click(object sender, EventArgs e)
    {
        string fileName = "FreeHouse.Power.Action.cs";
        Response.ContentType = "text/plain";
        Response.ContentEncoding = System.Text.Encoding.UTF8;
        HttpContext.Current.Response.AppendHeader("Content-Disposition", "attachment;filename=" + "" + fileName);
        Response.Write(FreeHouse.BLL.ToEnum.CreateAction());
        Response.End();
    }
    protected void Model_Click(object sender, EventArgs e)
    {
        string fileName = "FreeHouse.Power.Model.cs";
        Response.ContentType = "text/plain";
        Response.ContentEncoding = System.Text.Encoding.UTF8;
        HttpContext.Current.Response.AppendHeader("Content-Disposition", "attachment;filename=" + "" + fileName);
        Response.Write(FreeHouse.BLL.ToEnum.CreateModel());
        Response.End();
    }
    protected void All_Click(object sender, EventArgs e)
    {
        Field_Click(null, null);
        ActionClass_Click(null, null);
        Action_Click(null, null);
        Model_Click(null, null);
    }

 
}
